home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000007_icon-group-sender _Fri Jan 3 17:35:32 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 6 Jan 1997 06:19:53 MST
To: icon-group@cs.arizona.edu
Date: Fri, 03 Jan 1997 17:35:32 -0800
From: Stuart Robinson <robinstu@ohsu.edu>
Message-Id: <32CDB3E4.3358@ohsu.edu>
Organization: Oregon Health Sciences University
Sender: icon-group-request@cs.arizona.edu
Reply-To: robinstu@ohsu.edu
Subject: Another Question from the Neophyte
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1171
Hello. My last posting was promptly responded to. Thanks. I think
I've nearly solved all of the problems with the program. Once it is
finished, I will post it to the newsgroup for anyone interested.
But I've run into a new problem. I have found numerous options for
scanning forward in a string, but I haven't found a good way to move
backwards, besides first reversing a string and then scanning forward
(which is functionally scanning backwards).
For example, I created the following little program to extract the names
of some functions nestled at the end of some lines of HTML (see input
below):
=======================
procedure main()
while line := reverse(read()) do
line ?
{
write(reverse(tab(upto(" "))))
}
end
=======================
Example input:
<LI><a name="1" href="#a">convert to cset</A> cset()
<LI><a name="2" href="#b">convert to string</A> string()
<LI><a name="3" href="#c">find string</A> find()
etc.
Example output:
cset()
string()
find()
etc.
I did manage to find a solution, but isn't there less cumbersome way of
scanning backwards than using reverse()?
Thanks in advance.
Stuart Robinson
srobinso@reed.edu, robinstu@ohsu.edu